<?php

declare(strict_types=1);
/**
 * This file is part of Hyperf.
 *
 * @link     https://www.hyperf.io
 * @document https://hyperf.wiki
 * @contact  group@hyperf.io
 * @license  https://github.com/hyperf/hyperf/blob/master/LICENSE
 */

namespace HyperfTest\Cases;

use App\Service\BinanceService;
use App\Strategy\TrendFollowingStrategy;
use HyperfTest\HttpTestCase;

/**
 * @internal
 * @coversNothing
 */
class ExampleTest extends HttpTestCase
{
    public function testExample()
    {
        //        $this->assertTrue(true);
        //        $this->assertTrue(is_array($this->get('/')));
        $binance = new BinanceService(); // 假设构造函数不需要参数
        $symbol = 'ETHUSDT';

        $strategy = new TrendFollowingStrategy(
            $binance,
            $symbol,
            50,    // shortPeriod
            200,   // longPeriod
            14,    // rsiPeriod
            70,    // overbought
            30,    // oversold
            0.01   // maxSlippage
        );

        $result = $strategy->handle();
        var_dump($result);die;
    }
}
